<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        html,
        body {
            height: 100%;
        }

        div {
            height: 100%;
            width: 200px;
            background: red;
            position: fixed;
            left: 0px;
            top: 0px;

            transform: translateX(-100%);
            /* 100% 就是相对于自身的100% */
            animation: run 1s linear forwards;
            /* animation-fill-mode: forwards; */
            /* 
              none  就是没有
              backwards   就是保留初始一帧的状态
              forwards     保留最后一帧的画面
            */
        }

        @keyframes run {
            from {
                transform: translateX(-100%);
            }

            to {
                transform: translateX(0%);
            }
        }
    </style>
</head>

<body>
    <div></div>
</body>

</html>